import Vue from "vue";
import store from "@/store";

export default {
  /**
   * [获取用户下拉列表]
   * @return {[branchList]} [返回网点列表Promise对象]
   */
  getUserlist: function() {
    return axios.get(api.sets.userlist, {
      headers: {
        "Authorization": store.state.token
      }
    });
  },
  /**
   * [获取网点下拉列表]
   * @return {[branchList]} [返回网点列表Promise对象]
   */
  getBranch: function() {
    return axios.get(api.dropdown.branch, {
      headers: {
        "Authorization": store.state.token
      }
    });
  },
  /**
   * [获取角色下拉列表]
   * @return {[roleList]} [返回角色列表Promise对象]
   */
  getRole: function() {
    return axios.get(api.dropdown.role, {
      headers: {
        "Authorization": store.state.token
      }
    });
  },
   /**
   * [获取微信消息模板下拉列表]
   * @return {[templateList]} [返回消息模板列表Promise对象]
   */
  getTemplate: function() {
    return axios.get(api.dropdown.template, {
      headers: {
        "Authorization": store.state.token
      }
    });
  }
}